#!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
@author: xiaoL-pkav l@pker.in
@version: 2015/8/27 14:38
"""

# http://192.168.90.12:9200/_plugin/head/
es_colony = "http://192.168.90.12:9200"
db_host = "192.168.80.169"
db_user = "credit"
db_passwd = "Credit_12345"
db_port = 13306
# 导入数据库集合
DATABASES = [{
    "es_colony": es_colony,
    "db_host": db_host,
    "db_user": db_user,
    "db_pass": db_passwd,
    "db_port": db_port,
    "db_name": ["el_company"],
    "db_charset": "utf8",
    "index": "element-index-170707",
    "doc_type": "company170707",
    # "doc_field": ['id','entid', 'ENTNAME'],
    "doc_field": ["entid", "ENTNAME", "ORIREGNO", "ENTTYPE", "INDUSTRYPHY", "INDUSTRYCO", "ABUITEM",
                  "CBUITEM", "OPFROM", "OPTO", "POSTALCODE", "TEL", "EMAIL", "ESDATE", "APPRDATE", "REGORG",
                  "ENTSTATUS", "REGCAP", "OPSCOPE", "OPFORM", "OPSCOANDFORM", "PTBUSSCOPE", "DOM", "DOMDISTRICT",
                  "OPLOC", "OPLOCDISTRICT", "RECCAP", "NAME", "CANDATE", "REVDATE", "ANCHEYEAR", "EMPNUM", "PPRIPID",
                  "PENTNAME", "PREGNO", "HYPOTAXIS", "LOCALADM", "CREDLEVEL", "ASSDATE", "ENTCAT", "ECOTECDEVZONE",
                  "DOMPRORIGHT", "INSFORM", "PARNUM", "LIMPARNUM", "PARFORM", "EXENUM", "SCONFORM", "FORCAPINDCODE",
                  "MIDPREINDCODE", "PROTYPE", "CONGRO", "CONGROCUR", "CONGROUSD", "REGCAPUSD", "REGCAPCUR", "REGCAPRMB",
                  "FORREGCAPCUR", "FORREGCAPUSD", "FORRECCAPUSD", "WORCAP", "CHAMECDATE", "OPRACTTYPE", "FORENTNAME",
                  "DEPINCHA", "COUNTRY", "ITEMOFOPORCPRO", "CONOFCONTRPRO", "FORDOM", "FORREGECAP", "FOROPSCOPE",
                  "FOREIGNBODYTYPE", "ENTPROPERTY", "MANACATE"],

    "sql": "select company_basic.entid,company.ENTNAME,company_basic.ORIREGNO,company_basic.ENTTYPE,\
    company_basic.INDUSTRYPHY,company_basic.INDUSTRYCO,company_basic.ABUITEM,   company_basic.CBUITEM,company_basic.OPFROM,company_basic.OPTO,company_basic.POSTALCODE,company_basic.TEL,company_basic.EMAIL,company_basic.ESDATE,company_basic.APPRDATE,company_basic.REGORG,\
    company_basic.ENTSTATUS,company_basic.REGCAP,company_basic.OPSCOPE,company_basic.OPFORM,company_basic.OPSCOANDFORM,company_basic.PTBUSSCOPE,company_basic.DOM,company_basic.DOMDISTRICT,\
    company_basic.OPLOC,company_basic.OPLOCDISTRICT,company_basic.RECCAP,company_basic.NAME,company_basic.CANDATE,company_basic.REVDATE,company_basic.ANCHEYEAR,company_basic.EMPNUM,company_basic.PPRIPID,\
    company_basic.PENTNAME,company_basic.PREGNO,company_basic.HYPOTAXIS,company_basic.LOCALADM,company_basic.CREDLEVEL,company_basic.ASSDATE,company_basic.ENTCAT,company_basic.ECOTECDEVZONE,\
    company_basic.DOMPRORIGHT,company_basic.INSFORM,company_basic.PARNUM,company_basic.LIMPARNUM,company_basic.PARFORM,company_basic.EXENUM,company_basic.SCONFORM,company_basic.FORCAPINDCODE,\
    company_basic.MIDPREINDCODE,company_basic.PROTYPE,company_basic.CONGRO,company_basic.CONGROCUR,company_basic.CONGROUSD,company_basic.REGCAPUSD,company_basic.REGCAPCUR,company_basic.REGCAPRMB,\
    company_basic.FORREGCAPCUR,company_basic.FORREGCAPUSD,company_basic.FORRECCAPUSD,company_basic.WORCAP,company_basic.CHAMECDATE,company_basic.OPRACTTYPE,company_basic.FORENTNAME,\
    company_basic.DEPINCHA,company_basic.COUNTRY,company_basic.ITEMOFOPORCPRO,company_basic.CONOFCONTRPRO,company_basic.FORDOM,company_basic.FORREGECAP,company_basic.FOROPSCOPE,company_basic.FOREIGNBODYTYPE,company_basic.ENTPROPERTY,company_basic.MANACATE from company_basic , company where company_basic.entid=company.entid;"
}]


if __name__ == '__main__':
    print DATABASES[0]['sql']
